home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 6 / MacMania 6.toast / / Tools&Utilities / TouchMe 1.2□ / touchMe 1.2 Folder / touchMe source codes / CW11 PP source / source / Common Lib / UAppleEvents.h < prev    next >
Encoding:
Text File  |  1997-04-25  |  2.3 KB  |  98 lines  |  [TEXT/CWIE]

  1. // ==================================================
  2. //    UAppleEvents.h
  3. //    Copyright (C) 1996-1997 Mizutori Tetsuya
  4. //    October 5, 1996; February 6, 1997; April 23, 1997.
  5. // ==================================================
  6. //    All documents are pretty-printed in 10-point Geneva font.
  7.  
  8. #pragma once
  9.  
  10. class UAppleEvents {
  11.  
  12. public:
  13.                 UAppleEvents();
  14.                 ~UAppleEvents();
  15.  
  16.     // Handling descriptor.
  17.     //#include <AEDescExtractor.t>
  18.     static void        TheLongDateTime(
  19.                     const AEDesc &    inDesc,
  20.                     LongDateTime &    outValue );
  21.  
  22.     static void        TheText(
  23.                     const AEDesc &    inDesc,
  24.                     Handle &        outTextH,
  25.                     long &        outTextLen );
  26.  
  27.     static void        TheFSSpec(
  28.                     const AEDesc &    inDesc,
  29.                     FSSpec &        outFSSpec );
  30.  
  31.     // Handling Apple Event.
  32.     static Boolean    GetParamLongDateTime(
  33.                     const AppleEvent &    inAppleEvent,
  34.                     AEKeyword            inKeyword,
  35.                     LongDateTime &        outValue,
  36.                     const unsigned long    defaultValue = 0 );
  37.  
  38.     static Boolean    GetParamLong(
  39.                     const AppleEvent &    inAppleEvent,
  40.                     AEKeyword            inKeyword,
  41.                     long &            outValue,
  42.                     const long            defaultValue = 0 );
  43.  
  44.     static Boolean    GetParamEnum(
  45.                     const AppleEvent &    inAppleEvent,
  46.                     AEKeyword            inKeyword,
  47.                     OSType &            outValue,
  48.                     const OSType        defaultValue = typeNull );
  49.  
  50.     static Boolean    GetParamBoolean(
  51.                     const AppleEvent &    inAppleEvent,
  52.                     AEKeyword            inKeyword,
  53.                     Boolean &            outValue,
  54.                     const Boolean        defaultValue = true );
  55.  
  56.     static Boolean    GetParamPString(
  57.                     const AppleEvent &    inAppleEvent,
  58.                     AEKeyword            inKeyword,
  59.                     Str255            outString,
  60.                     const StringPtr        defaultString = "\p" );
  61.  
  62.     static Boolean    GetParamText(
  63.                     const AppleEvent &    inAppleEvent,
  64.                     AEKeyword            inKeyword,
  65.                     Handle            theTextH,
  66.                     long &            theTextLen );
  67.  
  68.     static void        PutParamText(
  69.                     AppleEvent &        ioAppleEvent,
  70.                     AEKeyword            inKeyword,
  71.                     Handle            theTextH,
  72.                     long                theTextLen );
  73.  
  74.     static void        PutParamFSSpec(
  75.                     AppleEvent &        ioAppleEvent,
  76.                     AEKeyword            inKeyword,
  77.                     const FSSpec &        inFSSpec );
  78.  
  79.     static void        AddFSSpec(
  80.                     AEDescList &        ioDescList,
  81.                     long                inIndex,
  82.                     const FSSpec &        inFSSpec );
  83.  
  84.     static void        PutParamFullPathname(
  85.                     AppleEvent &        ioAppleEvent,
  86.                     AEKeyword            inKeyword,
  87.                     ConstStr255Param    inFullPathname );
  88.  
  89.     static void        AddFullPathname(
  90.                     AEDescList &        ioDescList,
  91.                     long                inIndex,
  92.                     ConstStr255Param    inFullPathname );
  93.  
  94.  
  95. };
  96.  
  97. // end of definitions
  98.